<?php
header("Content-Type: application/json");
include('../../include/functions.inc.php');
$sql = "SELECT  concat(cllg_factura.SERIE,'-',cllg_factura.NUMERO) as factura,
                cllg_cheque.NUMERO,cllg_cheque.MONTO,
	            cllg_cheque.BANCO,
                cllg_cheque.ID
        FROM    cllg_factura,
                cllg_cheque
        WHERE   cllg_factura.STATUS = 1
        AND     cllg_cheque.FK_FACURA = cllg_factura.ID 
        AND     cllg_cheque.STATUS = 1";

$courses = $db->query_toJson_sql($sql, array("NUMERO" => "NUMERO", "MONTO" => "MONTO",
    "BANCO" => "BANCO", "FACTURA" => "factura", "ID" => "ID"));

echo $courses;
?>